package org.dtrd.modules.pushmessage.service;

import org.dtrd.modules.pushmessage.entity.po.DtrdRlPushMessage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import org.dtrd.modules.pushmessage.entity.bean.PushMessageDetail;
import org.dtrd.modules.pushmessage.entity.bean.PushMessageListInfo;
import org.dtrd.modules.pushmessage.entity.bean.PushMessageListRequest;
import org.dtrd.modules.pushmessage.entity.bean.PushMessagePageRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author xiao
 * @since 2022-08-08
 */
public interface IDtrdRlPushMessageService extends IService<DtrdRlPushMessage> {

    List<PushMessageListInfo> getPushMessageList(PushMessageListRequest request);

    IPage<PushMessageListInfo> pagePushMessage(PushMessagePageRequest request);

    PushMessageDetail getPushMessage(Integer dataId);

    boolean saveOrUpdatePushMessage(PushMessageDetail dto);

    boolean removePushMessage(Integer dataId);

    /**
     * 根据orgcode跟应用状态，查询是否已经存在应用
     * @param orgCode
     * @param applyStatus
     * @return
     */
    List<DtrdRlPushMessage> getPushMessageListByOrgCodeAndStatus(String orgCode, Boolean applyStatus);
}
